1. Technical Field
The present invention relates in general to sorting text strings and in particular to sorting text strings in a culturally correct order where the text string language does not provide pronunciation information and/or data processing system character codes are unsorted for the text string language. Still more particularly, the present invention relates to sorting text strings based on either pronunciation or user-defined sort orders artificially promoting selected text strings while displaying pronunciation- or sort order-independent representations of the text strings.
2. Description of the Related Art
Multinational companies often run information system (IS) networks which span multiple locales spread around the globe. To maximize the usefulness of such networks, operations within each country tend to run in the local language of the country. Where possible, names of abstract objects in user applications are in the local language and match the local language organization, city, or human names which the abstract objects represent. In the case of system management software, often abstract objects would represent each of a global enterprise""s local offices.
For offices located in Japan, objects would be named in Japanese. However, Japanese is a logosyllabic or ideographic language which does not have an alphabet representing simple sounds, but instead has a very large character set with symbols (xe2x80x9cideographsxe2x80x9d) corresponding to concepts and objects rather than simple sounds. For instance, the Joyo Kanji List (Kanji for Daily Use) adopted for the Japanese language in 1981 includes 1945 symbols.
In Japanese, the same ideograph may have multiple meanings and/or pronunciations. For instance, the symbol depicted in FIG. 4A may be pronounced either xe2x80x9chayashixe2x80x9d or xe2x80x9crinxe2x80x9d (or xe2x80x9clinxe2x80x9d); and the characters depicted in FIG. 4B may be pronounced xe2x80x9csuga no,xe2x80x9d xe2x80x9csuga ya,xe2x80x9d xe2x80x9ckan no,xe2x80x9d or xe2x80x9ckan ya.xe2x80x9d This circumstance is based in part on the history of the Japanese language, in which the Kanji characters were adopted from the Chinese language. Thus, for example, the xe2x80x9crinxe2x80x9d symbol depicted in FIG. 4A is On-Yomi, basically a simulation of the Chinese pronunciation when the character was imported to Japan, while xe2x80x9chayashillxe2x80x9d is Kun-Yomi, a Japanese word assigned to the character which has the same meaning.
A culturally correct sort order for names represented by identical ideographs might be based on pronunciation. However, ideographs or data processing system codes (e.g., Unicode codes) representing ideographs generally provide no information as to the correct pronunciation. Sorting a plurality of abstract objects by name, therefore, may result in an incorrect sort order being displayed.
An additional and independent complication arises in sorting abstract objects by name from the fact that the same Kanji character set is largely shared by the Chinese, Japanese and other Asian languages. The UNICODE Han unification has reordered the Kanji characters for Chinese, unsorting them for Japanese, as well as for Vietnamese and Korean.
Yet another independent sorting problem is that frequently a need arises to alter the collation sequence of a list or to create a second-order list. For instance, it may be desirable to sort a list of users alphabetically within each hierarchical level of an enterprise. That is, the user list is to be sorted with the enterprise""s principal officer first, followed by other officers sorted alphabetically and then by staff members sorted alphabetically. Currently names are xe2x80x9cfloatedxe2x80x9d to the top of a sorted list by inserting an extraneous character with a low sort value at the front of the string (e.g., xe2x80x9c_Frank Mossxe2x80x9d). However, the extraneous characters will normally be displayed in the sorted list.
It would be desirable, therefore, to provide a mechanism for sorting Japanese text strings in a culturally correct order. It would further be advantageous if the mechanism could be employed to sort Kanji character strings in a culturally correct order despite the sorting order employed by character sets. It would also be advantageous to sort text strings in a user-defined sort order with selected strings artificially promoted without displaying the mechanism by which the selected text strings are promoted.
It is therefore one object of the present invention to provide an improved method, system and computer program product for sorting text strings.
It is another object of the present invention to provide a method, system and computer program product for sorting text strings in a culturally correct order where the text string language does not provide pronunciation information and/or data processing system character codes are unsorted for the text string language.
It is yet another object of the present invention to provide a method, system and computer program product for sorting text strings based on either pronunciation or user-defined sort orders artificially promoting selected text strings while displaying representations of the text strings which are independent of pronunciation or artificial sort order mechanisms.
The foregoing objects are achieved as is now described. A multi-field text string contains display characters in a first field and sort characters in a second field. For ideographic languages such as Japanese, the display characters may be Kanji symbols for the text string while the sort characters are phonetic syllabary representations of the Kanji symbols. A plurality of such multi-field text strings may then be sorted by the contents of the second field rather than the contents of the first. Despite both the multiple pronunciations or meanings associated with the same Kanji symbols in Japanese and the unsorted ordering of Kanji symbols within the character set for Japanese, a culturally correct sort order is achieved for the multi-field text strings. Additionally, the contents of the second field may be altered to artificially promote a specific item within the sort order, while displaying the sorted text strings utilizing the contents of the first field. The mechanism for promoting particular text strings within the sort order does not interfere with user viewing of the displayed text strings.
The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.